<?php
class OrderLogDao {
	private $table = 'order_log';
	public function searchData($where= array()){
		$where = $this->searchWhere($where);
		return ClassManager::getSql()->onedata1($this->table,'*',$where);
	}
	public function searchWhere($where){
		$where1 = array();
		foreach ($where as  $k=>$v){
			if (!empty($v)){
				$where1[$k] =  $v;
			}
		}
		return $where1;
	}
	public function searchList($where=array(),$order='',$limit=0){
		$where = $this->searchWhere($where);
		return ClassManager::getSql()->dataList1($this->table,'*',$where,$order,$limit);
	}
	public function add($data){
		ClassManager::getSql()->insert($this->table, $data);
	}
}
?>